package com.swing.sky.web.generator.domain;

import java.io.Serializable;
import java.util.Objects;

/**
 * 数据库表对象
 *
 * @author swing
 */
public class Table implements Serializable {
    /**
     * 数据库名
     */
    private String tableSchema;
    /**
     * 表名
     */
    private String tableName;

    /**
     * 表描述
     */
    private String tableComment;

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (!(o instanceof Table)) {
            return false;
        }
        Table table = (Table) o;
        return Objects.equals(tableSchema, table.tableSchema) &&
                Objects.equals(tableName, table.tableName) &&
                Objects.equals(tableComment, table.tableComment);
    }

    @Override
    public int hashCode() {
        return Objects.hash(tableSchema, tableName, tableComment);
    }

    @Override
    public String toString() {
        return "Table{" +
                "tableSchema='" + tableSchema + '\'' +
                ", tableName='" + tableName + '\'' +
                ", tableComment='" + tableComment + '\'' +
                '}';
    }

    public String getTableSchema() {
        return tableSchema;
    }

    public void setTableSchema(String tableSchema) {
        this.tableSchema = tableSchema;
    }

    public String getTableName() {
        return tableName;
    }

    public void setTableName(String tableName) {
        this.tableName = tableName;
    }

    public String getTableComment() {
        return tableComment;
    }

    public void setTableComment(String tableComment) {
        this.tableComment = tableComment;
    }
}